/*
============================================================================
 Name        : pd_timer.h
 Author      : Jian(raphyer@hotmail.com)
 Version     :
 Copyright   : GPL
 Description : pd_timer.h - header file
============================================================================
*/

#ifndef PD_TIMER_H
#define PD_TIMER_H

#include "dd_define.h"

__DD_BEGIN_DECLS

typedef enum __pd_timer_type {
    PD_ONE_TIME = 0,
    PD_REPEAT
}pd_timer_type;


typedef void (*pd_timer_callback)(void* ptr) ;


typedef struct __pd_timer { 
    char dummy;
} pd_timer;


pd_timer* pd_timer_create(pd_timer_type type) ;

void pd_timer_destroy(pd_timer* timer) ;

int pd_timer_start(pd_timer* timer, DD_UINT time_millisecond, pd_timer_callback callback, void* ptr) ;

int pd_timer_stop(pd_timer* timer) ;

__DD_END_DECLS

#endif  /* PD_TIMER_H */

/* End of File */
